#!/bin/bash

# 'find' does not always return results in the same order so it needs to be 'sort'ed.
for i in $(find . -name "*.sh" | sort)
    do echo "${i}"
    if ! bash -n "${i}"; then
        exit 1
    fi
    if ! shellcheck "${i}"; then
        exit 1
    fi
done
